<?php $ds = $this->data_structure; ?>
<?php $pn = $this->page_number; ?>
<?php $links = $this->links; ?>


<div class="view_paginator">
	
	<?php if ($ds->ds['pds'] != null): ?>
	
	<table style="width: 100%">
		<tr>
			<td>
			</td>
			
			<?php if ($pn != 1): ?>
			<td style="width: 30px; text-align: center; vertical-align: middle; background-color: #ffffdd;">
				<a href="<?php echo $links[1]; ?>"><<</a>
			</td>
			
			<td style="width: 30px; text-align: center; vertical-align: middle; background-color: #ffffdd;">
				<a href="<?php echo $links[($pn - 1)]; ?>"><</a>
			</td>
			<?php endif; ?>
			
			<?php for ($p = 1; $p <= count($ds->ds['pds']); $p++): ?>
			
			<td style="width: 25px; text-align: center; vertical-align: middle;">
			
				<?php if ($p == $pn): ?>
				
				<b><?php echo $p; ?></b>
				
				<?php else: ?>
				
				<a href="<?php echo $links[$p];?>"><?php echo $p; ?></a>
				
				<?php endif; ?>
			
			</td>
			
			<?php endfor; ?>
			
			<?php if ($pn != count($ds->ds['pds'])): ?>
			<td style="width: 30px; text-align: center; vertical-align: middle; background-color: #ffffdd;">
				<a href="<?php echo $links[($pn + 1)]; ?>">></a>
			</td>
			
			<td style="width: 30px; text-align: center; vertical-align: middle; background-color: #ffffdd;">
				<a href="<?php echo $links[count($ds->ds['pds'])]; ?>">>></a>
			</td>
			<?php endif; ?>
			
			<td>
			</td>
		</tr>
	</table>
	
	<?php endif; ?>
	
</div>

